import React from 'react';
import style from './index.less';
import { Tooltip } from 'antd';
import classNames from 'classnames';

const EllipsisBox = ({ text, rows = 5, fontColor, bgcColor, styles, divRest, toolTipRest }) => {
  return (
    <Tooltip
      title={text}
      overlayInnerStyle={{
        color: fontColor ? fontColor : ' #292929',
        fontSize: 14,
      }}
      color={bgcColor ? bgcColor : '#ffffff'}
      {...toolTipRest}
    >
      <div className={classNames(style.ellipsisBox, styles)} {...divRest}>
        {text}
      </div>
    </Tooltip>
  );
};

export default EllipsisBox;
